package com.wang.mapper;

import com.wang.entity.Student;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface StudentMapper {
    @Select("select * from student")
    List<Student> getAll();

    @Select("select * from student where id = #{id}")
    Student getById(@Param("id") int id);
}